package com.jnevision.dict.service;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jnevision.dict.mapper.DictMapper;
import com.jnevision.dict.model.Dict;

/**
 * <p>
 * 数据字典表 服务实现类
 * </p>
 *
 * @author gavin
 * @since 2019-07-13
 */
@Service
public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> {

    public String getLabel(String type, String value) {
        System.out.println(type + "============" + value);
        return this.baseMapper.selectOne(new QueryWrapper<Dict>().eq("type", type).eq("value", value)).getLabel();
    }
}
